import Vue from 'vue'
import App from './App.vue'
import Date from './components/Date.vue'
import Range from './components/Range.vue'
import Product from './components/Product.vue'
import ProductDetail from './components/ProductDetail.vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import Mint from 'mint-ui'
import 'mint-ui/lib/style.css'
import VueRouter from 'vue-router'
import VueResource from 'vue-resource'

Vue.use(ElementUI) //一定要写
Vue.use(Mint)
Vue.use(VueRouter)
Vue.use(VueResource)

var routes = [
  {
    path: '/date',
    component: Date
  },
  {
    path: '/range',
    component: Range
  },
  {
    path: '/product',
    component: Product   
  },
  {
    path: '/product/:id',
    component: ProductDetail
   
  }
]

var router = new VueRouter({routes}) 
new Vue({
  el: '#app',
  router: router,
  render: h => h(App)
})
